package com.lzx.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lzx.user.entity.User;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author lzx
 * @since 2022-10-03
 */
@Mapper
public interface UserMapper extends BaseMapper<User> {

    //根据手机号来查询
    User selectByMobile(String phone);

    //通过昵称来查询用户
    User selectByNickname(String nickname);

    //获取所有用户
    List<User> getUserList();

    //根据id查询用户
    User selectUserById(Long id);

    //更新用户
    void updateUserById(Long id);
}
